package reflect;

import java.lang.reflect.Method;
/*访问private*/
public class reflectDemo6 {
    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName("reflect.Person");
        Object o = aClass.newInstance();

        Method seeHello4 = aClass.getDeclaredMethod("seeHello4");
        seeHello4.setAccessible(true);
        seeHello4.invoke(o);
        seeHello4.setAccessible(false);
    }
}
